import 'package:xin_nuo_pda/bean/work_load_list_entity.dart';
import 'dart:convert';

workLoadListEntityFromJson(WorkLoadListEntity data, Map<String, dynamic> json) {
	if (json['USER_NAME'] != null) {
		data.userName = json['USER_NAME'].toString();
	}
	if (json['LOT_ID'] != null) {
		data.lotId = json['LOT_ID'].toString();
	}
	if (json['MAIN_QTY'] != null) {
		data.mainQty = json['MAIN_QTY'] is String
				? int.tryParse(json['MAIN_QTY'])
				: json['MAIN_QTY'].toInt();
	}
	return data;
}

Map<String, dynamic> workLoadListEntityToJson(WorkLoadListEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['USER_NAME'] = entity.userName;
	data['LOT_ID'] = entity.lotId;
	data['MAIN_QTY'] = entity.mainQty;
	return data;
}